home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 17 / Hot Mix 17.iso / HM17_SGI / research / lib / live_plot.pro < prev    next >
Text File  |  1997-07-08  |  2KB  |  87 lines

  1. ; $Id: live_plot.pro,v 1.5 1997/04/16 20:19:16 billo Exp $
  2. ;
  3. ; Copyright (c) 1996-1997, Research Systems, Inc.  All rights reserved.
  4. ;       Unauthorized reproduction prohibited.
  5. ;
  6. ;+
  7. ; NAME:
  8. ;       LIVE_PLOT
  9. ;
  10. ; PURPOSE:
  11. ;       Entry point to LIVE_PLOT
  12. ;
  13. ; CALLING SEQUENCE:
  14. ;       LIVE_PLOT, yVector
  15. ;
  16. ; OPTIONAL KEYWORDS:
  17. ;       INDEPENDENT=xVector           ; The independent vector [optional]
  18. ;       STYLE=style                   ; A style name (string) [optional]
  19. ;        LINE=line                   ; Set to get a line plot (default)[optional]
  20. ;        SCATTER=scatter               ; Set to get a scatter plot [optional]
  21. ;        HISTOGRAM=histogram           ; Set to get a histogram plot [optional]
  22. ;        POLAR=polar                   ; Set to get a polar plot [optional]
  23. ;       INDEXED_COLOR=indexedColor ; Set to use indexed color [optional]
  24. ;
  25. ; DEVELOPMENT NOTES:
  26. ;        -
  27. ;
  28. ;------------------------------------------------------------------------------
  29. pro Live_Plot, y, _EXTRA=extra
  30.  
  31.     ON_ERROR,2
  32.  
  33.     WIDGET_CONTROL, /HOURGLASS
  34.  
  35.     ; Determine if the L_PLOT routine has been resolved
  36.     ;
  37.     result = ROUTINE_INFO(/UNRESOLVED)
  38.  
  39.     void = WHERE(result eq 'L_PLOT', count)
  40.  
  41.     ; If the L_PLOT routine has not been resolved find insight.sav
  42.     ; and restore it.
  43.     ;
  44.     if (count ne 0) then begin
  45.  
  46.         ; Look for insight in its default location idlxx/lib/hook
  47.         ;
  48.         insightPath = FILEPATH('insight.sav', SUBDIR=['lib','hook'])
  49.         void = FINDFILE(insightPath, COUNT=count)
  50.  
  51.         ; If it wasn't found, notify the user.
  52.         ;
  53.         if (count eq 0) then begin
  54.  
  55.             result = DIALOG_MESSAGE($
  56.                 ['Insight was not found.',$
  57.                 'Please make sure insight.sav is in your hook directory', $
  58.                 'and !DIR points to your IDL directory.', $
  59.                 'Do you wish to locate insight.sav?'], /CANCEL)
  60.  
  61.             ; If they want to search for it, display std file dialog.
  62.             ;
  63.             if (result eq 'OK') then begin
  64.  
  65.                 insightPath = $
  66.                     DIALOG_PICKFILE(TITLE='PLease locate insight.sav', $
  67.                         /MUST_EXIST)
  68.  
  69.                 if (insightPath eq '') then $
  70.                     return
  71.  
  72.             endif else $
  73.                 return
  74.  
  75.         endif
  76.  
  77.         ; Restore L_PLOT code
  78.         ;
  79.         restore, insightPath
  80.     endif
  81.  
  82.     ; Call L_PLOT with passed in parameters
  83.     ;
  84.     L_PLOT, y, _EXTRA=extra
  85.  
  86. end
  87.